import { useReactive } from "ahooks";
import { useModel } from "umi";
import compress from "gql-compress";

const useCommoditiesFromBrand = () => {
	const { graphqlFetch } = useModel("global");

	const state = useReactive({
		loading: false,
		commodities: [],
		totalCount: 0,
	});

	const loadCommoditiesFromBrand = async (brand) => {
		state.loading = true;
		state.commodities = [1, 1, 1, 1, 1];
		state.loading = false;
	};

	return { ...state, loadCommoditiesFromBrand };
};

let query = compress(``);

export default useCommoditiesFromBrand;
